package cn.lili.modules.order.order.entity.enums;

import cn.hutool.core.text.CharSequenceUtil;

/**
 * 交易状态枚举
 *
 * @author Chopper
 * @since 2020/11/17 7:27 下午
 */
public enum TradeStatusEnum {

    /**
     * 交易状态
     */
    UNPAID("未付款", "Pending"),
    PAID("已付款", "Payment Complete"),
    CANCELLED("已取消", "Canceled");

    private final String description;
    private final String descriptionEnglish;

    TradeStatusEnum(String description, String descriptionEnglish) {
        this.description = description;
        this.descriptionEnglish = descriptionEnglish;
    }

    public String getDescription() {
        return description;
    }

    public String description() {
        if (CharSequenceUtil.isNotBlank(this.descriptionEnglish)) {
            return this.descriptionEnglish;
        }
        return this.description;
    }


}
